package com.example.exception;

import org.springframework.http.HttpStatus;

/**
 * @author Jonathan
 * 2021/4/24 12:06
 * 枚举异常
 */
public enum ExceptionEnum {

    USER_NOT_FOUND("1001", "not found user", HttpStatus.NOT_FOUND);


    private String errorCode;
    private String errorMsg;
    private HttpStatus httpStatus;

    ExceptionEnum(String errorCode, String errorMsg, HttpStatus httpStatus) {
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
        this.httpStatus = httpStatus;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public HttpStatus getHttpStatus() {
        return httpStatus;
    }
}
